<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="stylesheet" href="assets/stylesheets/global.css">
        <link rel="stylesheet" href="assets/stylesheets/words.css">
        <link rel="stylesheet" href="assets/js/3rd/nanogallery2.min.css">
        <script>
            // 统计代码
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
               (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
               m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
             })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

             ga('create', 'UA-93231524-1', 'auto');
             ga('send', 'pageview');
        </script>
    </head>
    <body>

        <div id="article">
           <h1>相册</h1>
        </div>

        <div id="header">
            <a href="index.html"><div id="logo">JG</div></a>
        </div>

        <div id="nanogallery2" data-nanogallery2='{
        "thumbnailHeight": 210, "thumbnailWidth": 210,
        "itemsBaseURL": "uploads/album/"
      }'>

            {% for album in albums %}
            <a href="" data-ngkind="album" data-ngid="{{loop.index}}" data-ngthumb="{{ album.first }}">{{ album.album }}</a>
            {% set outer_loop = loop %} 
            {% for img in album.sub_imgs %}
                <a data-ngid="{{outer_loop.index}}{{ loop.index }}" data-ngalbumid="{{ outer_loop.index }}" href="{{ img }}" data-ngthumb="{{ img }}"></a>
            {% endfor %}
            {% endfor %}
        </div>
    </body>
    <script src="http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script>
    <script src="assets/js/3rd/jquery.nanogallery2.min.js"></script>
</html>
